﻿<?php/* Template Name: Link */;get_header(); ?>
<div id="content">
<div class="main">
<div style="display:none;"><?php if(!get_option('ini_bulletin') && get_option('ini_admin')){} else {include('includes/map.php');};?></div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<script type="text/javascript">
jQuery(document).ready(function($){
$(".flink a").each(function(e){
$(this).prepend('<img src=http://www.google.com/s2/favicons?domain='+this.href.replace(/^(http:\/\/[^\/]+).*$/, '$1').replace('http://','')+' style="float:left;padding:3px 8px 0 0" alt="favicon">');
}); 
});
</script>
<h2 class="title entry-title" property="v:title" style="text-align:center;margin:20px 0"><?php the_title();?></h2>
<div class="article" property="v:description">
<?php the_content();?>
<div class="flink">
<?php
$bookmarks = get_bookmarks('orderby=id&title_li=&categorize=');
if(!empty($bookmarks)){
    foreach ($bookmarks as $bookmark) {
        $output .= '<ul><li class="slow"><a href="'.$bookmark->link_url.'" title="'.$bookmark->link_description.'" rel="external"><i>'.$bookmark->link_name.'</i><span>'.$bookmark->link_description.'</span></a></li></ul>';
    }
    echo $output;
}
?>
</div>
<div class="clear"></div>
</div>
<div id="comments"><?php comments_template();?></div>
<?php endwhile; endif; ?>
</div>
</div>
<?php get_sidebar();?>
</div>
<?php get_footer();?>